package com.android.sharecar.model;

import android.location.Location;

/**
 * This is a child class of user, but online... 
 * @author xinyan
 *@date 2011-10-24
 */
public class OnlineUser extends User {
	public static final String TAG = "OnlineUser";

	// costant states of user
	public static final int STATE_NORMAL = 0; // normal

	/**
	 * user is driving his car.
	 */
	public static final int STATE_DRVING = 1; // user is driving his car.

	/**
	 * user picked a car.( i don't know whether we need this field or not.)
	 */
	public static final int STATE_PICKING = 2; // user picked a car

	/**
	 * user is waiting for a car.
	 */
	public static final int STATE_WAITING_FOR_RIDE = 3;

	/**
	 * user's request has been accept by the car owner.
	 */
	public static final int STATE_MATCH_SUCCESS = 4;

	/**
	 * ride picker is in the car.
	 */
	public static final int STATE_IN_CAR = 5;

	/**
	 * ride picker has get off the car.
	 */
	public static final int STATE_OFF_CAR = 6;

	private int status; // 可见控制：在线或者隐身
	private int rideState; // 行程状态(候车、已上车、已下车、开车)
	private String address; // specific address
	private String lastTalk; // the last talk user send in app.
	private Location location; // user's physical address..

	// the distance between other users and current login user.
	private double distanceWithCurrentLoginUser;

	public int getStatus() {
		return status;
	}

	public void setStatus(int status) {
		this.status = status;
	}

	public int getRideState() {
		return rideState;
	}

	public void setRideState(int rideState) {
		this.rideState = rideState;
	}

	public String getAddress() {
		return address;
	}

	public void setAddress(String address) {
		this.address = address;
	}

	public String getLastTalk() {
		return lastTalk;
	}

	public void setLastTalk(String lastTalk) {
		this.lastTalk = lastTalk;
	}

	public double getDistanceWithCurrentLoginUser() {
		return distanceWithCurrentLoginUser;
	}

	public void setDistanceWithCurrentLoginUser(
			double distanceWithCurrentLoginUser) {
		this.distanceWithCurrentLoginUser = distanceWithCurrentLoginUser;
	}

	public Location getLocation() {
		return location;
	}

	public void setLocation(Location location) {
		this.location = location;
	}

}
